//
//  NetWorkingDataManager.m
//  SZBank
//
//  Created by LuoYao on 16/7/11.
//  Copyright © 2016年 LuoYao. All rights reserved.
//

#import "NetWorkingDataManager.h"
#import "BJNetWorking.h"




@implementation NetWorkingDataManager

/**>投资者类型*/
+(void)getProtocolriskQuestionnaireTypeWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_risk_questionnaire_type!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>贺卡*/
+(void)getProtocolCardWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_card!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>广告*/
+(void)getProtocolAdvertisementWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_advertisement!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
//        failure(sender);
    }];
}
/**>移动端菜单管理*/
+(void)getProtocolProtocolDynamicMenuWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_dynamic_menu!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>推荐产品*/
+(void)getProtocolRecommendProductWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_recommend_product!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
//        failure(sender);
    }];
}
/**>功能数据详情*/
+(void)getProtocolTemplateUpdateWithProtocolid:(NSString *)Protocolid success:(Block)sucess failure:(Block)failure{
    NSString *URL = [NSString stringWithFormat:@"protocol_template!update.action?id=%@",Protocolid];
    [[BJNetWorking shareInstance]postRequest:URL param:nil success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
//        failure(sender);
    }];
}
/**>功能数据列表*/
+(void)getProtocolTemplateWithProtocolid:(NSString *)Protocolid success:(Block)sucess failure:(Block)failure{
    NSString *URL = [NSString stringWithFormat:@"protocol_template!list.action?id=%@",Protocolid];
    [[BJNetWorking shareInstance]postRequest:URL param:nil success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>通用功能列表*/
+(void)getProtocolTemplateWithSuccess:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_template!functions.action";
    [[BJNetWorking shareInstance]postRequest:URL param:nil success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>短信通知数据更新*/
+(void)getProtocolTextMessUpdateWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_text_mess!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>短信通知详情*/
+(void)getProtocolTextMessDetailWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_text_mess!detail.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>短信通知列表*/
+(void)getProtocolTextMessWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_text_mess!list.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>电子银行本地数据库更新*/
+(void)getProtocolEbankUpdateWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_ebank!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>电子银行详情*/
+(void)getProtocolEbankDetailWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_ebank!detail.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>电子银行列表*/
+(void)getProtocolEbankWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_ebank!list.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>反馈保存*/
+(void)getProtocolFeedBackWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_feed_back!save.action?email=2154@qq.com&content=abc&managerId=402881e5404bf1fb01404c9770e50016";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>客户头像保存*/
+(void)getProtocolCustomerUploadFileSaveWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_customer_upload_file!save.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>短信推送删除(单条或全部)*/
+(void)getProtocolShortNoteDeleteWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_short_note!delete.action?id=402880a24071b39b014071bd34bb0001";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>短信推送查阅状态修改*/
+(void)getProtocolShortNoteUpdateStatusWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_short_note!updateStatus.action?id=402880a24071b39b014071bd34bb0001";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>短信推送列表*/
+(void)getProtocolShortNoteWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_short_note!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>东吴宝收费标准列表*/
+(void)getProtocolDongWuBaoWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_dong_wu_bao!list.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>贷款利率详情*/
+(void)getProtocolLoanRateDetailWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_loan_rate!detail.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>贷款利率列表*/
+(void)getProtocolLoanRateWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_loan_rate!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>存款利率详情*/
+(void)getProtocolDepositRateDetailWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_deposit_rate!detail.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
/**>存款利率列表*/
+(void)getProtocolDepositRateWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_deposit_rate!list.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
//        failure(sender);
        NSLog(@"%@",sender);
    }];
}

//网点列表接口
+(void)getprotocol_web_siteWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_web_site!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//消息通知列表
+(void)getProtocolMessageManagerListWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_message_manager!list.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//消息通知详情
+(void)getProtocolMessageManagerDetailWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_message_manager!detail.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//信托详情
+(void)getProtocolBusinessTrustDetailWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_business_trust!detail.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//信托产品列表
+(void)getProtocolBusinessTrustWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_business_trust!list.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//保险分类
+(void)getProtocolInsuranceTypeWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_insurance_type!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//保险 本地数据
+(void)getProtocolInsuranceWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_insurance!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//贵金属产品分类
+(void)getProtocolPreciousMetalsSeriesWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_precious_metals_series!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//贵金属 本地数据库
+(void)getProtocolPreciousMetalsWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_precious_metals!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}

//理财产品分类 本地数据库更新
+(void)getProtocolGoldPomegranateTypeWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_gold_pomegranate_type!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//理财本地数据库更新
+(void)getProtocolGoldPomegranateWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_gold_pomegranate!update.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//产品经理管理密码修改
+(void)getProtocolManagerUpdatepassWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_manager!updatepass.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//产品经理管理登陆
+(void)getProtocolManagerLoginWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_manager!login.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
    
}
//公司产品详情
+(void)getProductParticularsWithParam:(NSDictionary *)parameter success:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_company_product!detail.action";
    [[BJNetWorking shareInstance]postRequest:URL param:parameter success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//公司产品列表
+(void)getProductsListWithSuccess:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_company_product!list.action";
    [[BJNetWorking shareInstance]postRequest:URL param:nil success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//获取问卷调查列表
+(void)getPgwbListWithSuccess:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_question!update.action?id=402880a24060a0eb014060c7c8ea0001";
    [[BJNetWorking shareInstance]postRequest:URL param:@{} success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}
//获取投资理财问卷调查列表
+(void)getProtocolListWithSuccess:(Block)sucess failure:(Block)failure{
    NSString *URL = @"protocol_question!update.action?id=402880c440055cb30140058916e10001";
    [[BJNetWorking shareInstance]postRequest:URL param:nil success:^(id sender) {
        sucess(sender);
    } failure:^(id sender) {
        failure(sender);
    }];
}


//请求url:http://117.172.47.171:1113/szbank/
//请求方法:protocol_short_note!update.action
//请求参数:{
//    id = 402886c250a7234e0150b14f8add00ea;
//    sessionId = "48276f66-f03d-4023-b3f2-7474e7ad116c";
//    time = "2015-11-13 09:04:54";
//}

//邮件接口
+ (void)getEmailWithSuccess:(Block)success failure:(Block)failure{
    NSString *URL = @"protocol_short_note!update.action";
    
    NSDictionary *dic = [PersonInfoSingle defaultPersonInfo].loginPersonInfo;
 
    NSString *personId = dic[@"ID"];
    NSString *personSessionId = dic[@"SESSIONID"];
    
    [[BJNetWorking shareInstance] postRequest:URL param:@{@"id":personId,@"sessionId":personSessionId} success:^(id sender) {
        success(sender);
    } failure:^(id sender) {
        
    }];
}



@end
